#include <gtk/gtk.h>
 
 void closeApp (GtkWidget *window, gpointer data) {
     gtk_main_quit();
 }
 
 int main (int argc, char *argv[]) {
     GtkWidget *window;
     GtkWidget *hello_label;
 
     gtk_init(&argc, &argv);
 
     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
     gtk_window_set_title(GTK_WINDOW(window), "HelloWorld");
     gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
     gtk_window_set_default_size(GTK_WINDOW(window), 200, 200);
 
     g_signal_connect(GTK_OBJECT(window), "destroy",
              GTK_SIGNAL_FUNC(closeApp), NULL);
     
     hello_label = gtk_label_new("Hello World!");
 
     gtk_container_add(GTK_CONTAINER(window), hello_label);
     gtk_widget_show_all(window);
     gtk_main();
 
     return 0;
 }
